<?php 
if($_GET['id_pzdel'] != ""){
$id_pzedl = $_GET['id_pzdel'];
include ("../class/pzclass.php");
$clspzclass = new pz();
$a = $clspzclass->deletepz($id_pzedl);

}
if(!$a)
{
	echo "<script>alert('Delete fail')</script>";
	echo "<meta http-equiv='refresh' content='0;URL=view_allpiezometer.php'>";
	
	}else{
			$clspzclass->dbclose();
			echo "<script>alert('Delete finished')</script>";
			echo "<meta http-equiv='refresh' content='0;URL=view_allpiezometer.php'>";
	}
?>